package gui;

import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class SellGUI extends JFrame {

	private static final long serialVersionUID = 736994669551942264L;
	
	JFrame sellFrame;
	JPanel sellPanel;
	JTextField  sellText;
	
	public SellGUI (GUI listener)
	{
		//sellText
		sellText = new JTextField();
		
		//SellPanel
		sellPanel = new JPanel();
		sellPanel.add(sellText);
		
		//SellFrame
		
		sellFrame = new JFrame("UCSD Textbooks!");
		sellFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	    
	    //Size is SplashPage Image size plus a few on both sides.
		sellFrame.setSize(600, 300);
	    
	    //Starts top left corner of screen
		sellFrame.setLocation(50, 50);
	    
		sellFrame.setContentPane(sellPanel);
	    
		//icon
	    try {                
	    	BufferedImage image = ImageIO.read(new File("./images/watersports1.jpg"));
	    	sellFrame.setIconImage(image);
	    } catch (IOException ex) {
	            //File does not exist or error
	    	    //Simply ignore.
	    }
		
	    //after creating shows the GUI
	    sellFrame.setVisible(true);
	    
	    return;
	}
	
}
